{% extends 'basic.html' %}
{% load static %}
{% block title  %}投票首页{% endblock  %}
{% block content %}
    <div class="row h3">  
        {% if username == "游客" %}
            <a href="login">请登录</a>
            <p>欢迎，{{username}}</p>
        {% else %}
            <p>欢迎，{{username}}</p>
            <a href="quit">退出登录</a>
        {% endif %}   
    </div>
    <div class="row h4">
        <h1 class="text-center text-warning">投票首页</h1>
        <ol>
            {% for question in questions %}
                <li>
                    <a href="{% url 'Post:detail' question.id %}" target="_blank">
                        {{ question.question_text }}
                    </a>
                    {{ question.release_time }}
                </li>
            {% endfor %}
        </ol>
    </div>
{% endblock  %}
